package com.sgy.springboot_demo.service;

import com.sgy.springboot_demo.mapper.UserMapper;
import com.sgy.springboot_demo.pojo.User;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {

    Logger logger = LoggerFactory.getLogger(UserService.class);

    @Autowired
    private UserMapper userMapper;

    public List<User> findAllUsers() {
        List<User> allUsers = userMapper.findAllUsers();
        logger.info("查询出来的用户信息：" + allUsers.toString());
        return allUsers;
    }
}
